package org.example.what_mall.util;

public class RegexUtil {
    private static final String EMIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
    private static final String PHONE = "^1[3-9]\\d{9}$";

    public static boolean isEmail(String email) {
        return email.matches(EMIL);
    }
    public static boolean isPhone(String phone) {
        return phone.matches(PHONE);
    }
}
